<template> 
<div id="china - map"></div> 
</template> 
<script> 
import echarts from 'echarts'; 
// 引入中国地图的json数据 
import chinaJson from './china.json'; 
export default {
     name: 'ChinaMap', 
     mounted() {
         // 基于准备好的dom，初始化echarts实例 
        var myChart = this.$echarts.init(document.getElementById('china - map')); 
        echarts.registerMap('china', chinaJson); 
        // 绘制图表 
        var option = { 
            // title: { text: '中国地图示例' },
            tooltip: {}, 
            series: [ 
                { 
                    type:'map', 
                    mapType: 'china', 
                    data: [] 
                } 
            ] 
            }; 
            myChart.setOption(option); 
        } 
        }; 
</script> 
<style scoped> 
</style>